<header class="page-header clearfix">
    <h4><i class="fa fa-file-image-o"></i>我的镜像</h4>
</header>
<section>
    <div class="margin-bottom-10">
        <div class="btn-group">
            <button type="button" ng-repeat="opt in ::list.imageTypeList" class="btn btn-default" ng-class="{'btn-info': opt.type == list.filter.imageType}" ng-click="list.setImageType(opt.type)">{{::opt.name}}
            </button>
        </div>
    </div>
    <!--搜索下拉框 -->
              <div class="form-group image-file-element" style="width:240px;" ng-show="searchBtn" ng-class="{'has-error': (form.baseImgId.$touched || form.$submitted )
                          && form.baseImgId.$error.required}">
                            <ui-select ng-model="list.user" ng-change="list.selectUser()" name="baseImgId"  required>
                                 <ui-select-match placeholder="请选择用户">
                                    <span>{{$select.selected.userCode}}</span>
                                </ui-select-match> 
                                <ui-select-choices repeat="user as user in list.username | filter: $select.search">
                                    <span ng-bind-html="user.userCode"></span>
                                </ui-select-choices>
                            </ui-select>
                             <div class="text-danger" ng-show="(form.baseImgId.$touched || form.$submitted )
                                && form.baseImgId.$error.required">
                            </div> 
                        </div>    
    <div class="panel panel-list service-detail-panel" ng-style="::img.border" ng-repeat="img in list.table">
        <div class="panel-body">
            <div class="form-search clearfix">
                <strong ng-style="::img.color">{{::img.imageName}}</strong>
            </div>
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>版本</th>
                        <!--<th>状态</th>
                        <th>端口</th>-->
                        <th>更新时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="ver in img.versions">
                        <td>
                            {{::ver.tag}}
                        </td>
                        <!--<td>{{::ver.state}}</td>
                        <td>
                            {{::ver.servicePort}}
                        </td>-->
                        <td>
                            {{::ver.lastUpdateTime}}
                        </td>
                        <td>
                            <span ng-show="list.filter.imageType=='001'&&list.filter.imageType!='002'">无</span>
                            <!--<a href="" ng-click="list.editImage(ver)">编辑</a>-->
                            <a href="" ng-if="list.filter.imageType=='002'" class="margin-right-15"  ng-click="list.setConfigs(ver)">配置管理</a>

                            <a ng-if="list.filter.imageType!='001'" href="" ng-click="disabled || list.setShare(ver)" class="margin-right-15" ng-disabled="disabled" ng-show="Share">共享</a>
                            <span  ng-if="list.filter.imageType=='003'" href=""  class="szfenxiang">来自{{::ver.userCodeOfShare}}的分享</span>

                        </td>
                    </tr>
                </tbody>
            </table>
             <div class="loading" style="margin: 0 auto" ng-show="!img.versions"></div>
        </div>
    </div>
    <div class="loading" style="margin: 0 auto" ng-show="!list.table"></div>
    <div ng-show="list.table" class="pagination-group margin-bottom-20">
        <ui-pagination-info items-per-page="5" items-per-page-select="false" total-items="list.page.totalItems" current-page="list.page.currentPage"></ui-pagination-info>
        <button type="button" ng-click="list.getList()" class="btn btn-default btn-refresh"><i class="fa fa-refresh"></i></button>
        <ui-pagination items-per-page="5" total-items="list.page.totalItems" ng-model="list.page.currentPage" ng-change="list.getList()"></ui-pagination>
    </div>
</section>
